package SFT;

/**describes a function-
 * 			coeff*e^(2*pi*i*alpha/size)
 */
public class ChiFunction extends abstractFunction {

	private double alpha;
	private int size;
	private Complex coeff;
	
	public ChiFunction(int alpha,int size)
	{
		this.alpha=alpha;
		this.size=size;
		this.coeff=new Complex(1,0);
		
	}
	
	public ChiFunction(double alpha,int size, Complex c)
	{
		this.alpha=alpha;
		this.size=size;
		this.coeff=c;
		
	}
	
	@Override
	public Complex apply(int i) {
		return Complex.Mult(coeff, Complex.Chi(i, alpha, size));
	}

	@Override
	public int maxVal() {
		return size-1;
	}

}
